//
//  GuideCell.m
//  j绝版新闻客户端
//
//  Created by weige on 16/5/8.
//  Copyright © 2016年 weige. All rights reserved.
//

#import "GuideCell.h"

@interface GuideCell ()
@end
@implementation GuideCell
@synthesize imageView,nextBtn;
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        //设置imgview的frame
        imageView=[[UIImageView alloc]initWithFrame:ScreenBounds];
        //设置内容的填充方式
        imageView.contentMode=UIViewContentModeScaleAspectFill;
        [self addSubview:imageView];
        //设置btn
        nextBtn=[[UIButton alloc]initWithFrame:CGRectMake((ScreenBounds.size.width-100)*0.5, ScreenBounds.size.height-110, 100, 33)];
        [nextBtn setBackgroundImage:[UIImage imageNamed:@"icon_next"] forState:UIControlStateNormal];
        [nextBtn addTarget:self action:@selector(nextBtnClick:) forControlEvents:UIControlEventTouchUpInside];
        nextBtn.hidden=YES;
        [self addSubview:nextBtn];
        
    }
    return self;
}

-(void)setNextButtonHidden:(BOOL )hidden

{
    nextBtn.hidden=hidden;
}
-(void)nextBtnClick:(UIButton *)sender
{
   
    //发送通知
    [[NSNotificationCenter defaultCenter]postNotificationName:GuideViewControllerDidFinish object:nil];
}
@end
